from tkinter import *

master = Tk()

#theLB = Listbox(master)
#theLB = Listbox(master,selectmode=SINGLE)
theLB = Listbox(master,selectmode=EXTENDED)

theLB.pack()

theLB.insert(0,'欢迎光临')

for item in ['苹果','香蕉','橘子','梨']:
    theLB.insert(END,item)

theLB.delete(1)
theLB.insert(END,'谢谢惠顾')

theButton = Button(master,text='删除它',\
                   command=lambda x=theLB:x.delete(ACTIVE))
theButton.pack()

mainloop()
